.textarea:not([rows]) {
    max-height: 600px;
    min-height: 100px;
}

.textarea {
    display: block;
    max-width: 100%;
    min-width: 100%;
    padding: .625rem;
    resize: vertical;
    &.is-hovered,
    &:hover {
        border-color: #b5b5b5;
    }
    &.is-focused,
    &:focus {
        border-color: #3273dc;
        box-shadow: 0 0 0 .125em rgba(50, 115, 220, 0.25);
        outline: none;
    }

    &.is-small {
        font-size: .75rem;
    }
    &.is-medium {
        font-size: 1.25rem;
    }

    &[disabled] {
        color: #7a7a7a;
        background: whitesmoke;
        box-shadow: none;
        border-color: whitesmoke;
        cursor: not-allowed;

        &::placeholder {
            color: rgba(122, 122, 122, 0.3);
        }
    }

    &[readonly] {
        box-shadow: none !important;
    }
}

.input,
.textarea {
    border: 1px solid #dbdbdb;
    border-radius: 3px;
    font-size: 1rem;
    line-height: 1.5;
    background-color: white;
    color: #363636;
    box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);

    &::placeholder {
        color: gray(54, 0.3);
    }
}

.input {
    appearance: none;
    align-items: center;
    border: 1px solid transparent;
    display: inline-flex;
    font-size: 1rem;
    /* 使用em以方便使高度根据字体大小调整  */
    height: 2.25em;
    justify-content: flex-start;
    line-height: 1.5;
    padding-bottom: calc(0.375em - 1px);
    padding-left: calc(0.625em - 1px);
    padding-right: calc(0.625em - 1px);
    padding-top: calc(0.375em - 1px);
    position: relative;
    vertical-align: top;
    background-color: white;
    border-color: #dbdbdb;
    color: #363636;
    &::placeholder {
        color: color(#363636 a(30%));
    }
    max-width: 100%;
    width: 100%;
    box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);
    &.is-primary {
        border-color: var(--primary);
    }
    &.is-info {
        border-color: var(--info);
    }
    &.is-small {
        font-size: .75rem;
        border-radius: 2px;
    }
    &.is-medium {
        font-size: 1.25rem;
        border-radius: 4px;
    }
    &.is-large {
        font-size: 1.5rem;
        border-radius: 8px;
    }
    &.is-hovered,
    &:hover {
        border-color: #b5b5b5;
    }
    &.is-focused,
    &:focus {
        border-color: #3273dc;
        box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25);
        outline: none;
    }
    &[disabled] {
        background-color: whitesmoke;
        border-color: whitesmoke;
        box-shadow: none;
        color: #7a7a7a;
        &::placeholder {
            color: color(#7a7a7a a(30%));
        }
    }
    &[readonly] {
        box-shadow: none;
        &::placeholder {
            color: #363636;
        }
    }
    &.is-static {
        background: transparent;
        border: none;
        box-shadow: none;
        padding-left: 0;
        padding-right: 0;
    }
}

select {
    appearance: none;
    border: 1px solid gray(219);
    background: transparent;
    padding: calc(0.375em - 1px) 2.5em calc(0.375em - 1px) calc(0.625em - 1px);
    color: gray(54);
    border-radius: 3px;
    outline: none;
    box-shadow: none;
    height: 2.25em;
    line-height: 1.5;
    font-size: 1em;

    &:hover, &.is-hovered {
        border-color: gray(181);
    }

    &:focus, &.is-focused, &:active, &.is-activated {
        border-color: #3273dc;
        box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25);
    }
}

@keyframes rotate {
    from {
        transform: translateY(-50%) rotate(0);
    }

    to {
        transform: translateY(-50%) rotate(359deg);
    }
}

.select {
    position: relative;
    display: inline-block;
    &.is-rounded select {
        border-radius: 1.125em;
        padding-left: 1em;
    }

    &.is-small {
        font-size: .75rem;
    }

    &.is-medium {
        font-size: 1.25rem;
    }

    &.is-loading:after {
        border: 2px solid gray(219);
        width: 1em;
        height: 1em;
        border-radius: .5em;
        border-top: none;
        border-right: none;
        animation: .7s linear 0s infinite rotate;
    }
}

.select:after {
    content: '';
    position: absolute;
    border: 1px solid #3273dc;
    border-top: none;
    border-right: none;

    width: .5em;
    height: .5em;

    top: 50%;
    transform: translateY(calc(-50% - .125em)) rotate(-45deg);
    right: calc((2.25em - .5em) / 2);
}

.file {

    user-select: none;

    &.is-small {
        font-size: .75rem;
    }

    &.is-fullwidth {

        & .file-name {
            flex: 1 1 auto;
            max-width: none;
        }
    }

    &.is-boxed .file-cta {
        flex-direction: column;
        align-items: center;
        padding: 1em 3em;
        height: auto;
    }

    &.is-right {
        &.has-name .file-cta {
            border-radius: 0px 3px 3px 0px;
        }
        & .file-label {
            flex-direction: row-reverse;


            & .file-name {
                border-right-width: 0px;
                border-left-width: 1px;
                border-radius: 3px 0px 0px 3px;
            }
        }
    }

    &.has-name .file-cta {
        border-top-right-radius: 0px;
        border-bottom-right-radius: 0px;
    }

    & .file-input {
        display: none;
    }

    & .file-label {
        display: flex;
    }
    & .file-cta {
        background-color: whitesmoke;
        color: gray(74);
        box-shadow: none;
        height: 2.25em;
        line-height: 1.5;
        border: 1px solid gray(218);
        padding: calc(.375em - 1px) 1em;
        border-radius: 3px;
        cursor: pointer;
        display: inline-flex;

        & .file-icon {
            display: inline-block;
            margin-right: .5em;
        }

        &:hover {
            background-color: gray(238);
        }

    }

    & .file-name {
        display: block;
        border: 1px solid gray(218);
        border-left-width: 0px;
        height: 2.25em;
        padding: calc(.375em - 1px) 1em;
        max-width: 16em;
        overflow: hidden;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
        border-radius: 0 3px 3px 0px;
    }
}
